home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 301-325 / disk_319 / cnewssrc / cnews.orig.lzh / misc / newshostname < prev    next >
Text File  |  1989-06-27  |  575b  |  15 lines

  1. #! /bin/sh
  2. # newshostname - print the hostname known to the news system
  3. # =()<. ${NEWSCONFIG-@<NEWSCONFIG>@}>()=
  4. . ${NEWSCONFIG-/usr/lib/news/bin/config}
  5. # export NEWSCTL NEWSBIN NEWSARTS
  6.  
  7. PATH=$NEWSCTL/bin:$NEWSBIN:$NEWSPATH ; export PATH
  8. umask $NEWSUMASK
  9.  
  10. # "test -r && cat" is used here instead of just "cat" because pre-v8
  11. # cat's are broken and return good status when they can't read their files.
  12. ( (test -r $NEWSCTL/whoami && cat $NEWSCTL/whoami) || hostname ||
  13.     (test -r /etc/whoami && cat /etc/whoami) ||
  14.     uuname -l || uname -n || echo the_unknown_host) 2>/dev/null
  15.